package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the DEFINITION_DEPT database table.
 * 
 */
@Entity
@Table(name="DEFINITION_DEPT")
@NamedQuery(name="DefinitionDept.findAll", query="SELECT d FROM DefinitionDept d")
public class DefinitionDept implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="DEFINITION_DEPT_DEFIDEID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="DEFINITION_DEPT_DEFIDEID_GENERATOR")
	@Column(name="DEFIDE_ID")
	private long defideId;

	@Column(name="DEFIDE_FATHERID")
	private BigDecimal defideFatherid;

	@Column(name="DEFIDE_FOUNDDATE")
	private Timestamp defideFounddate;

	@Column(name="DEFIDE_NAME")
	private String defideName;

	@Column(name="DEFIDE_PERSON")
	private String defidePerson;

	@Column(name="DEFIDE_UPDATEDATE")
	private Timestamp defideUpdatedate;

	//bi-directional many-to-one association to EmployeesMobilize
	@OneToMany(mappedBy="definitionDept")
	@JSONField(serialize=false)
	private List<EmployeesMobilize> employeesMobilizes;

	//bi-directional many-to-one association to QuestionBank
	@OneToMany(mappedBy="definitionDept")
	@JSONField(serialize=false)
	private List<QuestionBank> questionBanks;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="definitionDept")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	//bi-directional many-to-one association to Teacher
	@OneToMany(mappedBy="definitionDept")
	@JSONField(serialize=false)
	private List<Teacher> teachers;

	//bi-directional many-to-one association to Team
	@OneToMany(mappedBy="definitionDept")
	@JSONField(serialize=false)
	private List<Team> teams;

	public DefinitionDept() {
	}

	public long getDefideId() {
		return this.defideId;
	}

	public void setDefideId(long defideId) {
		this.defideId = defideId;
	}

	public BigDecimal getDefideFatherid() {
		return this.defideFatherid;
	}

	public void setDefideFatherid(BigDecimal defideFatherid) {
		this.defideFatherid = defideFatherid;
	}

	public Timestamp getDefideFounddate() {
		return this.defideFounddate;
	}

	public void setDefideFounddate(Timestamp defideFounddate) {
		this.defideFounddate = defideFounddate;
	}

	public String getDefideName() {
		return this.defideName;
	}

	public void setDefideName(String defideName) {
		this.defideName = defideName;
	}

	public String getDefidePerson() {
		return this.defidePerson;
	}

	public void setDefidePerson(String defidePerson) {
		this.defidePerson = defidePerson;
	}

	public Timestamp getDefideUpdatedate() {
		return this.defideUpdatedate;
	}

	public void setDefideUpdatedate(Timestamp defideUpdatedate) {
		this.defideUpdatedate = defideUpdatedate;
	}

	public List<EmployeesMobilize> getEmployeesMobilizes() {
		return this.employeesMobilizes;
	}

	public void setEmployeesMobilizes(List<EmployeesMobilize> employeesMobilizes) {
		this.employeesMobilizes = employeesMobilizes;
	}

	public EmployeesMobilize addEmployeesMobilize(EmployeesMobilize employeesMobilize) {
		getEmployeesMobilizes().add(employeesMobilize);
		employeesMobilize.setDefinitionDept(this);

		return employeesMobilize;
	}

	public EmployeesMobilize removeEmployeesMobilize(EmployeesMobilize employeesMobilize) {
		getEmployeesMobilizes().remove(employeesMobilize);
		employeesMobilize.setDefinitionDept(null);

		return employeesMobilize;
	}

	public List<QuestionBank> getQuestionBanks() {
		return this.questionBanks;
	}

	public void setQuestionBanks(List<QuestionBank> questionBanks) {
		this.questionBanks = questionBanks;
	}

	public QuestionBank addQuestionBank(QuestionBank questionBank) {
		getQuestionBanks().add(questionBank);
		questionBank.setDefinitionDept(this);

		return questionBank;
	}

	public QuestionBank removeQuestionBank(QuestionBank questionBank) {
		getQuestionBanks().remove(questionBank);
		questionBank.setDefinitionDept(null);

		return questionBank;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setDefinitionDept(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setDefinitionDept(null);

		return staffInformation;
	}

	public List<Teacher> getTeachers() {
		return this.teachers;
	}

	public void setTeachers(List<Teacher> teachers) {
		this.teachers = teachers;
	}

	public Teacher addTeacher(Teacher teacher) {
		getTeachers().add(teacher);
		teacher.setDefinitionDept(this);

		return teacher;
	}

	public Teacher removeTeacher(Teacher teacher) {
		getTeachers().remove(teacher);
		teacher.setDefinitionDept(null);

		return teacher;
	}

	public List<Team> getTeams() {
		return this.teams;
	}

	public void setTeams(List<Team> teams) {
		this.teams = teams;
	}

	public Team addTeam(Team team) {
		getTeams().add(team);
		team.setDefinitionDept(this);

		return team;
	}

	public Team removeTeam(Team team) {
		getTeams().remove(team);
		team.setDefinitionDept(null);

		return team;
	}

}